/**
 * @BmpMovieEffect.as
 *
 * @author sodaChen mail:sujun10@qq.com
 * @version 1.0
 * <br>Program Name:GameEngine
 * <br>Date:2016-9-1
 */
package com.asframe.display.bmp
{
	import com.asframe.display.data.DirMovieData;
	import com.asframe.Const;
	import com.asframe.mgr.ResMgr;
	import com.asframe.utils.MovieDirUtils;

	import flash.display.MovieClip;

	/**
	 * 专门播放特效的用的
	 * 这个类已经废弃
	 * @author sodaChen
	 * #Date:2016-9-1
	 */
	public class BmpMovieEffect extends BitmapMovieDir
	{
		private var _isLoop:Boolean;
		private var _complete:Function;

		public var playLayer:int;
		public function loadEffect(url:String,isLoop:Boolean,complete:Function = null):void
		{
			this._isLoop = isLoop;
			this._complete = complete;
			ResMgr.getInstance().load(url,onLoad);
		}
		public function playEffect(isLoop:Boolean,complete:Function = null):void
		{
			playLabel(Const.PLAY_EFFECT,dir,isLoop,complete);
		}
		private function onLoad(mc:MovieClip):void
		{
			var dirMovieData:DirMovieData = new DirMovieData();
			dirMovieData.labelMap.put(Const.PLAY_EFFECT,MovieDirUtils.parseBitmapMovie(mc,Const.PLAY_EFFECT,false));
			setDirMovieData(dirMovieData);
			playLabel(Const.PLAY_EFFECT,dir,_isLoop,_complete);
			_complete = null;
		}
	}
}